package com.tyk.bookstore.back.member.model.query;

import com.tyk.bookstore.back.common.core.model.constant.ValidConstant;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

@Data
public class DeliveryAddressAddQuery {
    @NotNull
    @Schema(description = "用户ID")
    @Min(1)
    private Long memberId;
    @NotBlank
    @Size(min = 1, max = 16)
    @Schema(description = "名称")
    private String name;
    @NotBlank
    @Size(min = 1, max = 16)
    @Schema(description = "收件人姓名")
    private String consignee;
    @NotNull
    @Schema(description = "所在地区")
    @Min(1)
    private Long areaId;
    @NotBlank
    @Size(min = 1, max = 48)
    @Schema(description = "详细地址")
    private String address;
    @Pattern(regexp = ValidConstant.PHONE_REGEXP)
    @NotBlank
    @Schema(description = "手机号")
    @Size(min = 11, max = 11)
    private String phone;
}
